import { Global, Logger as _Logger, Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Logger } from 'libs/db/entity/logger.entity';
import { LoggerController } from './logger.controller';
import { LoggerService } from './logger.service';
@Global()
@Module({
    imports: [
        TypeOrmModule.forFeature([Logger])
    ],
    controllers: [
        LoggerController
    ],
    providers: [
        LoggerService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        },
        _Logger
    ],
    exports: [
        LoggerService,
    ]
})
export class LoggerModule { }
